package com.ruoyi.xzs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xzs.mapper.PaperAnswerMapper;
import com.ruoyi.xzs.domain.PaperAnswer;
import com.ruoyi.xzs.service.IPaperAnswerService;

/**
 * 学生答卷Service业务层处理
 * 
 * @author li
 * @date 2023-03-08
 */
@Service
public class PaperAnswerServiceImpl implements IPaperAnswerService 
{
    @Autowired
    private PaperAnswerMapper paperAnswerMapper;

    /**
     * 查询学生答卷
     * 
     * @param id 学生答卷主键
     * @return 学生答卷
     */
    @Override
    public PaperAnswer selectPaperAnswerById(Long id)
    {
        return paperAnswerMapper.selectPaperAnswerById(id);
    }

    /**
     * 查询学生答卷列表
     * 
     * @param paperAnswer 学生答卷
     * @return 学生答卷
     */
    @Override
    public List<PaperAnswer> selectPaperAnswerList(PaperAnswer paperAnswer)
    {
        return paperAnswerMapper.selectPaperAnswerList(paperAnswer);
    }

    /**
     * 新增学生答卷
     * 
     * @param paperAnswer 学生答卷
     * @return 结果
     */
    @Override
    public int insertPaperAnswer(PaperAnswer paperAnswer)
    {
        return paperAnswerMapper.insertPaperAnswer(paperAnswer);
    }

    /**
     * 修改学生答卷
     * 
     * @param paperAnswer 学生答卷
     * @return 结果
     */
    @Override
    public int updatePaperAnswer(PaperAnswer paperAnswer)
    {
        return paperAnswerMapper.updatePaperAnswer(paperAnswer);
    }

    /**
     * 批量删除学生答卷
     * 
     * @param ids 需要删除的学生答卷主键
     * @return 结果
     */
    @Override
    public int deletePaperAnswerByIds(Long[] ids)
    {
        return paperAnswerMapper.deletePaperAnswerByIds(ids);
    }

    /**
     * 删除学生答卷信息
     * 
     * @param id 学生答卷主键
     * @return 结果
     */
    @Override
    public int deletePaperAnswerById(Long id)
    {
        return paperAnswerMapper.deletePaperAnswerById(id);
    }
}
